/**
 * Created by Berlin-IOU on 2017/12/6.
 */
jQuery(function ($) {
    $(".btn_delete").click(function (e) {
        e.stopPropagation();
        e.preventDefault();
        var $a=$(this);
        var href=$(this).attr("href");
         $.post(href,{_method:'DELETE'},function (data) {
             if(data && data.status=='SUCCESS'){
                $.toast({
                   heading: '提示',
                    text: data.message,
                   showHideTransition: 'slide',
                     icon: 'success',
                   position: 'bottom-right'
                 });
                 $a.parent().parent().remove();
            }else {
                 $.toast({
                    heading: '提示',
                     text: "删除失败",
                    showHideTransition: 'slide',
                    icon: 'error',
                     position: 'bottom-right'
                 });
             }
         })
    })





    $(document).on("focus",".birthday",function(){
        console.log(">>>>>>>>>>>>>>>");
        $(this).datepicker({
            autoclose: true,
            format: 'yyyy-mm-dd',
            startView:'month',
            minView: 1,
            todayHighlight: true,
            language: 'zh-CN',
            viewSelect: 'day'
        });
    })





})